package exam.business.service;

import exam.common.constant.ResultPort;
import exam.common.key.KeyStudent;
import exam.model.dao.TStudentDAO;
import exam.system.business.AbstractService;
import exam.system.business.BusinessServiceInfo;

public class StudentDeleteService extends AbstractService {
	private TStudentDAO tStudentDAO = new TStudentDAO();
	@Override
	public String executeService(BusinessServiceInfo serviceInfo)
			throws Exception {
		String studentCd = serviceInfo.getString(KeyStudent.T_STUDENT_CD);
		int del = tStudentDAO.deleteStudentByCd(studentCd);
		if(del != 0) {
			return ResultPort.SUCCESS;
		} else {
			return ResultPort.FAIL;
		}
	}
}
